package com.smm.web.vmc.domain;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by zhenghao on 2016/8/26.
 * 仓单对象
 */
@Entity
@Table(name="receipt")
public class Receipt implements Serializable {

    //重量单位 吨
    public static final int Weight_Type_ton=0;
    //重量单位 千克
    public static final int Weight_Type_kilo=1;

    //数量单位 捆
    public static final int Quantity_Type_bundle=0;
    //数量单位 包
    public static final int Quantity_Type_package=1;

    private String no;  //仓单编号

    private Warehouse warehouse;    //所属仓库

    private String ownerName;   //货主名称

    private String breed;   //品种名称

    private String attribute;   //属性名称

    private BigDecimal goodsWeight;     //重量

    private Short weightType;           //重量单位

    private BigDecimal goodsQuantity;   //数量

    private Short quantityType;         //数量单位

    private Date joinTime;              //入库时间

    private String location;            //货物所在库位

    private String ledOrder;            //led 点亮指令


    public String getLedOrder() {
        return ledOrder;
    }

    public void setLedOrder(String ledOrder) {
        this.ledOrder = ledOrder;
    }

    @Id
    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    @ManyToOne
    @JoinColumn(name="warehouse_id")
    public Warehouse getWarehouse() {
        return warehouse;
    }

    public void setWarehouse(Warehouse warehouse) {
        this.warehouse = warehouse;
    }

    public String getOwnerName() {
        return ownerName;
    }

    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public String getAttribute() {
        return attribute;
    }

    public void setAttribute(String attribute) {
        this.attribute = attribute;
    }

    public BigDecimal getGoodsWeight() {
        return goodsWeight;
    }

    public void setGoodsWeight(BigDecimal goodsWeight) {
        this.goodsWeight = goodsWeight;
    }

    public Short getWeightType() {
        return weightType;
    }

    public void setWeightType(Short weightType) {
        this.weightType = weightType;
    }

    public BigDecimal getGoodsQuantity() {
        return goodsQuantity;
    }

    public void setGoodsQuantity(BigDecimal goodsQuantity) {
        this.goodsQuantity = goodsQuantity;
    }

    public Short getQuantityType() {
        return quantityType;
    }

    public void setQuantityType(Short quantityType) {
        this.quantityType = quantityType;
    }

    public Date getJoinTime() {
        return joinTime;
    }

    public void setJoinTime(Date joinTime) {
        this.joinTime = joinTime;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }
}
